home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 2).iso / 1445 / read.me < prev    next >
Encoding:
Text File  |  1997-05-11  |  15.7 KB  |  391 lines

  1. Introduction.
  2.  
  3. pcBESTOP is an interpreter written for the IBM compatiple PC. It is a
  4. 32-bit program that runs under Windows-95 and Windows NT. My intent was 
  5. to provide pretty much the same functionality as the BESTOP that is 
  6. available on the IBM370; you should read BESTOP.DOC that was written for
  7. the IBM370 version. Differences between the mainframe version and the PC 
  8. version are noted below.
  9.  
  10. pcBESTOP allows you to quickly reformat files, extract data, summarize
  11. data, match/merge files, perform table lookup and other functions. It
  12. is a positional language with a one character operations code. In the PC
  13. version though, I've added a couple of two character op codes. Programs
  14. can be written very very quickly.
  15.  
  16.  
  17. Installation.
  18.  
  19. After you have unzipped all the files, put the .DLL and .EXE files into
  20. a subdirectory that is in your path; for example C:\WINDOWS.
  21.  
  22.  
  23. Status.
  24.  
  25. This is a shareware program. It may be distributed freely. Educational
  26. institutions and students need not send remuneration.
  27.  
  28.  
  29. Contacting the author.  (see REGISTER.TXT)
  30.  
  31.  
  32. --------------------------------------------------------------------------
  33.  
  34. 4/6/97 release 1
  35.  
  36. This is the first version of pcBESTOP. The functions that are currently 
  37. supported are listed below, they are checked with a "√" mark. Item marked
  38. with an "*" will not be implemented, at leat not now. 
  39.  
  40.   OPERATION                        SYNTAX
  41.  
  42. √ IF_(Character_Field_Comparison)  I field [EGLU] [field|const] [AO ]
  43. √ IF_(Numeric_Field_Comparison)    I N     field  [EGLU]        [field|const] [AO ]  
  44. * IF_(Multiple_Comparison)         I M     field  [EU]          const [AO ]
  45. √ IF_(character_comparison)        I C     field  [EU]          const
  46. √ IF_(Control_Break)               I field [AO ]
  47. √ IF_(Printer_Line_Test)           I C     [EGLU] const         [AO ]
  48. √ IF_(Matched Files)               I [ABM] [AO ]
  49. √ IF_(Start/End of File)           I [SF]  [AO ]
  50. √ OTHERWISE                        O
  51. √ UNCONDITIONAL                    U
  52. √ MATCH_KEYS                       K field field  (field field)...
  53. √ MOVE                             M [field|const] field
  54. √ MOVE_(from_displaced_field)      M field D field field
  55. √ MOVE_(to_displaced_field)        M [field|const] field D field
  56. √ FIND                             F [field|const] field D field
  57. √ DO_AGAIN                         D
  58. √ EDIT                             E field field const
  59. √ CLEAR                            C field const
  60. √ ADD                              + [field|const]  field
  61. √ SUBTRACT                         - [field|const]  field
  62. √ MULTIPLY                         X field [field|const] (0-9) field
  63. √ DIVIDE                           / field [field|const] (0-9) field
  64. √ WRITE_(Numbered_Files)           W (1-6)
  65. √ WRITE_(Listing_with_Spaces)      W L [1-9H]
  66. * WRITE_(Listing_with_Skip_to_Numbered_Line)       W L S const
  67. * Write_(Space_Printer_without_Printing)           W S [1-9H]
  68. * WRITE_(Skip_to_Numbered_Line_without_Printing)   W S const
  69. √ GET                              G
  70. √ HALT                             H  
  71. √ SUBROUTINE                       S [1-9A-Z]
  72. √ RETURN                           R
  73. √ BRANCH                           B [1-9A-Z]
  74. √ TABLE_DEFINITION                 T [1-9A-Z] field  field
  75. √ TABLE_ENTRY                      const
  76. √ LOOKUP                           L [1-9A-Z] [ELH] 
  77.   
  78.  
  79. The files that are supported are 1 thru 6, L and S. Very little syntax
  80. checking is being done; I expect the programs to be clean. Below is
  81. a typical batch file. It shows how external files names are communicated
  82. to the program. 
  83.  
  84.  
  85. @set dd:sysprint=STDOUT:
  86. @set dd:sysprint=dump,append(n)
  87. @SET DD:PROGRAM=P3.BST 
  88. @set dd:file1=file1
  89. @set dd:file2=extract.dat,append(n)
  90. @set dd:file3=MYCOMP.DSM
  91. @set dd:listing=matched.dat,append(n)
  92. BESTOP /T=1,A=1,B=3
  93.  
  94.  
  95. *here is a test program.
  96. K 1.2.5 3.2.5 
  97. I M 
  98. m 1.1.50 s.1.50
  99. m s.41.50 l.1.10
  100. C L.66 'a'
  101. w l 
  102. I 3.30 E '0'
  103. M 3.1.66 2.1.66
  104. W 2
  105.  
  106.  
  107. When I ran this batch file and program, I got the following on a
  108. 200Mhz Pentium.
  109.  
  110.  
  111. D:\HB2|t3
  112. D:\HB2|BESTOP /T=1,A=1,B=3
  113.  
  114. pcBESTOP ;-) 97.095.10:08ß  (C)1997 Hans J. Becker
  115. Elapsed time=     2 sec
  116. F1     23 F2    978 F3   7233 F4      0 F5      0 F6      0 List      23
  117.  
  118.  
  119. NOTES:
  120.  
  121.  
  122. If an output file previously exists, then new data will be appended unless
  123. it does not previously exist or 'append(n)' has been specified.
  124.  
  125. All subroutines need to be coded at the "end" of the program. The table
  126. follows the subroutines.
  127.  
  128. Results from arithmetic calculations will be stored in zoned-decimal
  129. format. Since fields involved in calculations are implictly identified
  130. as numeric, resulting fileds will be zero filled.
  131.  
  132. The Key instruction must be the first instruction in the program.
  133.  
  134. All comments and blank lines are ignored and not stored (v. ";" below).
  135.  
  136. Use single quote to delimit strings.
  137.  
  138. "W L 2" means write AFTER skipping one lines; i.e. 2 lines are written.
  139.  
  140. The default values are LNSIZE=80 and PGSIZE=60 for LISTING. These values
  141. can be overriden in the execute statement as follows
  142.  
  143.     BESTOP /I=1,LNSIZE=133,PGSIZE=55
  144.  
  145. To write a header for a report, typically code something like this
  146.  
  147.     I C L '02'
  148.     C L.1.80 '*'
  149.     W L 1
  150.     C L.1 '*'
  151.     C L.80 '*'
  152.           [more header info]
  153.     W L
  154.     C L.1.80 '*'
  155.     W L 1
  156.     U
  157.  
  158. When the number of lines on a page exceed PGSIZE, a new page and header
  159. will be written. The LISTING file has the "print" attribute, therefore
  160. it starts out with a 0x0C.
  161.  
  162. Control-break processing and matched-file processing are 
  163. mutually exclusive.
  164.  
  165.  
  166. --------------------------------------------------------------------------
  167.  
  168. Changes:
  169.  
  170. 4/9/97   
  171.  
  172.    Clear buffer i for W i, i.e. clear the buffer after a write.
  173.  
  174.    BESTOP can now do a table look-up. You can have only one table
  175.    and it has to be an internal table i.e. part of the program.
  176.  
  177.  
  178. 4/10/97  
  179.  
  180.    The look-up table gets sorted and the search is a binary search
  181.    when L i E was coded. A sequential search is used whenever
  182.    L i L or L i H is coded.
  183.  
  184.  
  185.  
  186. 4/11/97  
  187.  
  188.    Multiply and divide works now. The scale factor for division is 6;
  189.    i.e. you can specisfy up to 6 decimal places.
  190.  
  191.    Added E(diting) facility. You can have a period as an insertion
  192.    character  and blanks are uses for zero suppression; this is
  193.    the only editing than can be done at this time.
  194.  
  195. 4/12/97  
  196.  
  197.    Consolidated compound condition processing for the various forms
  198.    of the IF statement. 
  199.  
  200.    Added Character Compare IF.
  201.  
  202.  
  203. 4/13/97  
  204.  
  205.    DO AGAIN  has been added. 
  206.  
  207. 4/18/97
  208.   
  209.    Added the DATE are, i.e. YYMMDD is in D.27.31
  210.    
  211.    Allow for stacked commands using the semicolon as the parsing
  212.    character (see program example P8). Be aware that the semicolon
  213.    also terminates a comment, i.e. the following line will produce
  214.    and error
  215.                 *TESTING NUMERIC IF; CONTROL BREAK
  216.  
  217.    since it parses as
  218.      
  219.                 *TESTING NUMERIC IF
  220.                 CONTROL BREAK              <- error
  221.  
  222.    Added the CHange command 
  223.  
  224.                 CH 'target' [col1][/col2] 'replacement'
  225.  
  226.  
  227.    There are several useful command line switches:
  228.  
  229.    DEBUG prints the program after it has been resolve by the parsing
  230.    routine. Use this to verify that this is what you expected the
  231.    program to do. Only the fields 1 thru 5 are displayed.
  232.  
  233.  
  234.    D:\HB2\EXAMPLES|BESTOP /I=1,DEBUG
  235.    
  236.    pcBESTOP ;-) 97.109.08:30  (C)1997 Hans J. Becker
  237.    001 1: I          2: 1.3        3: E          4: '9'        5: O
  238.    002 1: I          2: 1.11.13    3: E          4: 'rwx'      5:
  239.    003 1: M          2: 1.1.80     3: S.1.80     4:            5:
  240.    004 1: CH         2: 'ico'      3: 6/20       4: '&&&&'     5:
  241.    005 1: CH         2: 'DATA'     3: 'data'     4:            5:
  242.    006 1: CH         2: '\NETSCAPE 3: ''         4:            5:
  243.    007 1: CH         2: '5'        3: '$'        4:            5:
  244.    008 1: CH         2: ':'        3: 48         4: '='        5:
  245.    009 1: CH         2: ' '        3: 11/50      4: '_'        5:
  246.    010 1: M          2: S.1.80     3: L.1.80     4:            5:
  247.    011 1: W          2: L          3: 1          4:            5:
  248.    012 1: U          2: STOP       3: HERE       4:            5:
  249.    Elapsed time=     1 sec     04/19/97      08:36.32
  250.    F1      81 F2       0 F3       0 F4       0 F5       0 F6       0 List       46
  251.    
  252.  
  253.    VERBOSE prints the program as it is read.
  254.  
  255.  
  256.    D:\HB2\EXAMPLES|BESTOP /I=1,verbose
  257.    
  258.    pcBESTOP ;-) 97.109.08:30  (C)1997 Hans J. Becker
  259.    *TEST  CHange
  260.    I 1.3 E '9' O
  261.    I 1.11.13 E 'rwx'
  262.    M 1.1.80 S.1.80           *ch is made only in "S"
  263.    CH 'ico' 6/20   '&&&&'    *note ch in size
  264.    CH 'DATA' 'data'
  265.    ch '\NETSCAPE' ''         *note ch in size
  266.    CH '5' '$'
  267.    ch ':' 48   '='           *ch in specific col
  268.    CH ' ' 11/50  '_'         *ch between specific cols
  269.    M S.1.80 L.1.80
  270.    W L 1
  271.    Elapsed time=     0 sec     04/19/97      08:56.24
  272.    F1      81 F2       0 F3       0 F4       0 F5       0 F6       0 List       46
  273.    
  274.    
  275.    TRACE shows order in which the program statements are executed. Use
  276.    this to checks your program logic.   
  277.    
  278.    
  279.    D:\HB2\EXAMPLES|BESTOP /I=1,trace
  280.  
  281.     pcBESTOP ;-) 97.109.08:30  (C)1997 Hans J. Becker                    
  282.    <LOGIC>
  283.    001 1: I          2: 1.3        3: E          4: '9'        5: O         
  284.    002 1: I          2: 1.11.13    3: E          4: 'rwx'      5:           
  285.    003 1: M          2: 1.1.80     3: S.1.80     4:            5:           
  286.    004 1: CH         2: 'ico'      3: 6/20       4: '&&&&'     5:           
  287.    005 1: CH         2: 'DATA'     3: 'data'     4:            5:           
  288.    006 1: CH         2: '\NETSCAPE 3: ''         4:            5:           
  289.    007 1: CH         2: '5'        3: '$'        4:            5:           
  290.    008 1: CH         2: ':'        3: 48         4: '='        5:           
  291.    009 1: CH         2: ' '        3: 11/50      4: '_'        5:           
  292.    010 1: M          2: S.1.80     3: L.1.80     4:            5:           
  293.    011 1: W          2: L          3: 1          4:            5:           
  294.    012 1: U          2: STOP       3: HERE       4:            5:           
  295.    <LOOP><001><002><001><002><001><002><001><002><001><002><001><002><001><002><001
  296.    ><002><001><002><001><002><003><004><005><006><007><008><009><010><011><001><002
  297.    ><001><002><001><002><001><002><003><004><005><006><007><008><009><010><011><001
  298.    ><002><001><002><001><002><001><002><001><002><001><002><001><002><001><002><001
  299.    ><002><001><002><001><002><001><002><001><002><003><004><005><006><007><008><009
  300.    ><010><011><001><002><001><002><001><002><001><002><001><002><001><002><001><002
  301.    ><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005
  302.    ><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010
  303.    ><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004
  304.    ><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009
  305.    ><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003
  306.    ><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008
  307.    ><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002
  308.    ><003><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007
  309.    ><008><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001
  310.    ><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005><006
  311.    ><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010><011
  312.    ><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005
  313.    ><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010
  314.    ><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004
  315.    ><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009
  316.    ><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003
  317.    ><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008
  318.    ><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002
  319.    ><003><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007
  320.    ><008><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001
  321.    ><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005><006
  322.    ><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010><011
  323.    ><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005
  324.    ><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010
  325.    ><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004
  326.    ><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009
  327.    ><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003
  328.    ><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008
  329.    ><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002
  330.    ><003><004><005><006><007><008><009><010><011><001><002><001><002><001><002><001
  331.    ><002>
  332.    Elapsed time=     0 sec     04/19/97      08:58.36
  333.    F1      81 F2       0 F3       0 F4       0 F5       0 F6       0 List       46
  334.    
  335.  
  336.                                                           
  337.    DUMP=n causes n input records to be dumped to FILEDUMP. This is particularly
  338.    useful when trying match/merge files. The dumped output lists the file number
  339.    followed by a colon and then the data.
  340.       
  341.       
  342. 4/23/97
  343.  
  344.    Type 2 match (T=2) one-for-one/many now works.      
  345.       
  346. 4/25/97
  347.   
  348.    added a TRanslate function
  349.  
  350.       TR field source-const target-const
  351.  
  352.    added find and both forms of the displacement moves   
  353.    
  354.    One more dubugging tool is the DMP option; it causes all the varliables
  355.    to be dummped at the end of the program or when an error occured.
  356.    e.g.
  357.  
  358.    BESTOP /T=1,A=1,B=3,LNSIZE=120,PGSIZE=9999,DUMP=100,DMP
  359.  
  360.    and here is a partial listing of the output
  361.  
  362.  
  363. pcBESTOP ;-) 97.116.13:55  (C)1997 Hans J. Becker
  364. Elapsed time=     2 sec     04/27/97      08:33.35
  365. F1      91 F2       0 F3      84 F4       0 F5       0 F6       0 List      160
  366.  . . . . . . . . . . . . . . . . . . .DUMP. . . . . . . . . . . . . . . . . . .
  367. ICH='pcBESTOP ;-) 97.116.13:55  (C)1997 Hans J. Becker                    '
  368. LOWER='abcdefghijklmnopqrstuvwxyz'              UPPER='ABCDEFGHIJKLMNOPQRSTUVWXY
  369. Z'                      AKEY='                                                  
  370.                               '                 BKEY='                          
  371.                                                       '                 BUFFER='
  372. total 968'              BLOCK='total 968            '                   CNT1=
  373.          91             CNT2=             0     CNT3=            84     CNT4=
  374.           0             CNT5=             0     CNT6=             0     CNTL=
  375.         160             COL1=        0          COL2=        0          COND='0'
  376. B                       DEBUG='0'B              DMP='1'B                DUMP=
  377.    100                  EXTENT=        2        EOF='1'B                EOT='0'B
  378.                         EOF1='1'B               EOF2='1'B               EOF3='1'
  379. B                       EOF4='1'B               EOF5='1'B               EOF6='1'
  380. B                       EOP='1'B                ERROR=       0          FALSE='0
  381. 'B                      FILE_CODE='L'           FIRST_PRINT='0'B        FIRST_RE
  382. AD='0'B                 FIRST_TIME='0'B         FLD='L.112.116'         HEX00='
  383.  
  384.  
  385. 5/2/97
  386.  
  387.    In oder to stay with a one character op-code, 
  388.    let A (alter) be an alias for the CHange command and
  389.    let Z (zap?)  be an alias for the TRanslate command. 
  390.  
  391.